<template>
  <div class="vip-basic-wrapper child-app-wrapper">
    <WujieVue
      class="vip-basic-wrapper"
      name="vipBasic"
      :url="url"
      :sync="true"
      :plugins="vipBasicPlugins"
      :alive="alive"
      :props="{ jumpFn,resolvePath }"
    ></WujieVue>
  </div>
</template>
<script>
import { aliveChildren } from "@/core/child-projects-config"
import hostMap from "@/utils/hostMap"
const proKey = "vipBasic"
export default {
  data() {
    return {
      vipBasicPlugins: [],
      url: hostMap(proKey),
      alive: aliveChildren[proKey],
    }
  },
  mounted() {},
  computed: {},
  methods: {
    /***只要子应用未激活，则props为undefined。故不能在子应用本身内部将主应用的路由切到自身上。 */
    // jumpSelfChildPro() {
    //   this.$router.push("/vipBasic")
    // },
    jumpFn(location) {
      this.$router.push(location)
    },
    resolvePath(location) {
      return this.$router.resolve(location)
    }
  },
}
</script>
<style scoped>
.child-app-wrapper,
.vip-basic-wrapper {
  width: 100%;
  height: 100%;
  overflow: auto;
}
</style>
